#ifndef  _MFG_COORD_H
#define  _MFG_COORD_H

/* INCLUDE */
#include "../mfg.h"

/* MACRO */
#define MFG_PERIOD_EVENT     0x0800
#define COORD_ZDP_SEND_DELAY_SEC  3

#define NODE_ROUTER     0x01
#define NODE_ENDDEV     0x02

#define  NODE_ST_TC     0x00
#define  NODE_ST_ANNCE  0x01
#define  NODE_ST_EP     0x02

#define  NODE_TIME_TC      10
#define  NODE_TIME_ANNCE   5

#define  EP_STA_NEW        0
#define  EP_STA_START      1

/* typdef */

/* function */
extern bool MFG_WhiteListAdd(uint8_t *mac);
extern bool MFG_WhiteListCheck(uint8_t *mac);
//stack indication
void MFG_TcJoinInd(uint16_t nodeId, uint8_t *mac, uint16_t parent);
void MFG_DeviceAnnounceInd(uint16_t nodeId, uint8_t *mac, uint8_t nodeType);
bool MFG_ActiveEpInd(uint16_t nodeId, uint8_t seq, uint8_t status, uint8_t epCnt, uint8_t* epList);
bool MFG_SimpleDescInd(uint16_t nodeId, uint8_t seq, uint8_t ep, uint16_t profId, uint16_t devId, uint8_t devVer,
                       uint8_t inNum, uint16_t *inCluster, uint8_t outNum, uint16_t *outCluster);

//zdp command
bool MFG_ActiveEpQuery(uint16_t nodeId, uint8_t *pSeq);
bool MFG_SimpleDescQuery(uint16_t nodeId, uint8_t *pSeq, uint8_t ep);
void MFG_ZdpReqPoll(void);

//zdp rsp

#endif